#ifndef TEMPADC_H
#define TEMPADC_H

// #include <stdint.h>
#include "typed.h"
#include "TempSysType.h"

extern uint8_t ch;


typedef struct
{
    uint16_t oven;
    uint16_t oven_set;
    _Pt_Status oven_Err; //0,正常, 1:开路报错, 2:短路报错, 3:低温报警, 4:高温报警
    uint16_t probe1;
    uint16_t probe1_Err;
    uint16_t probe2;
    uint16_t probe2_Err;
    uint16_t probe3;
    uint16_t probe3_Err;
    uint32_t timer;
    uint8_t p_value;
}_Temp_Param;
extern _Temp_Param Temp_Param;

typedef struct __RTD
{
    int32_t value; //Integer that contains the process value
    _Pt_Status status;
}_RTD;
extern _RTD RTD[4];

extern uint8_t LowTemp_Ctrl;
extern float AD_1v;

void ADInit(void);
void ADC_Clock(void);
void ADSampling(void);
void TempADC_Main(void);
void LowTempAlarm(void);
void ADC_KeyUpDown(void);

#endif
